// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   DatabaseConnectionConfig.java

package org.quickserver.util.xmlreader;

import java.io.Serializable;

public class DatabaseConnectionConfig
    implements Serializable
{

    public DatabaseConnectionConfig()
    {
        id = "";
        driver = "";
        url = "";
        username = "";
        password = "";
    }

    public String getId()
    {
        return id;
    }

    public void setId(String id)
    {
        if(id != null)
            this.id = id;
    }

    public String getDriver()
    {
        return driver;
    }

    public void setDriver(String driver)
    {
        if(driver != null)
            this.driver = driver;
    }

    public String getUrl()
    {
        return url;
    }

    public void setUrl(String url)
    {
        if(url != null)
            this.url = url;
    }

    public String getUsername()
    {
        return username;
    }

    public void setUsername(String username)
    {
        if(username != null)
            this.username = username;
    }

    public String getPassword()
    {
        return password;
    }

    public void setPassword(String password)
    {
        if(password != null)
            this.password = password;
    }

    public String toXML(String pad)
    {
        if(pad == null)
            pad = "";
        StringBuilder sb = new StringBuilder();
        sb.append(pad).append("<database-connection>\n");
        sb.append(pad).append("\t<id>").append(getId()).append("</id>\n");
        sb.append(pad).append("\t<driver>").append(getDriver()).append("</driver>\n");
        sb.append(pad).append("\t<url>").append(getUrl()).append("</url>\n");
        sb.append(pad).append("\t<username>").append(getUsername()).append("</username>\n");
        sb.append(pad).append("\t<password>").append(getPassword()).append("</password>\n");
        sb.append(pad).append("</database-connection>\n");
        return sb.toString();
    }

    private String id;
    private String driver;
    private String url;
    private String username;
    private String password;
}
